package com.cong.nio.echo;

import java.io.IOException;
import java.io.OutputStream;
import java.net.Socket;
import java.nio.charset.StandardCharsets;
import java.util.concurrent.ExecutorService;
import java.util.concurrent.Executors;

public class NioClient2 {
    public static void main(String[] args) throws IOException {
        ExecutorService pool = Executors.newFixedThreadPool(100);

        Socket socket = new Socket("127.0.0.1",8888);
        OutputStream outputStream = socket.getOutputStream();
        String s = "hello 222222222222222222";
        outputStream.write(s.getBytes(StandardCharsets.UTF_8));
        outputStream.close();
    }
}
